package com.zry.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.zry.entity.Blog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Zry
 */

public interface BlogMapper extends BaseMapper<Blog> {

    List<Integer> findBlogByYear();

    /**
     * 分割线
     * =============================================================================================
     * 以下方法都是 文章归档测试使用
     * @return
     */

    IPage<Blog> findByPage(IPage<Blog> page, @Param("year")Integer year,@Param(Constants.WRAPPER) Wrapper<Blog> wrapper);

    List<String> findBlogGroupByYear();

}